home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.20041116-20060924 / 000306_rock_spambust_violin@yahoo.com_Thu Apr 20 10:12:06 2006.msg < prev    next >
Internet Message Format  |  2006-09-27  |  2KB

  1. Path: newsmaster.cc.columbia.edu!newsfeed.nyu.edu!news.maxwell.syr.edu!postnews.google.com!z34g2000cwc.googlegroups.com!not-for-mail
  2. From: "tomviolin" <rock_spambust_violin@yahoo.com>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: speed of script execution
  5. Date: 20 Apr 2006 02:16:13 -0700
  6. Organization: http://groups.google.com
  7. Lines: 39
  8. Message-ID: <1145524573.729587.320320@z34g2000cwc.googlegroups.com>
  9. NNTP-Posting-Host: 67.53.150.18
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset="iso-8859-1"
  12. X-Trace: posting.google.com 1145524580 12008 127.0.0.1 (20 Apr 2006 09:16:20 GMT)
  13. X-Complaints-To: groups-abuse@google.com
  14. NNTP-Posting-Date: Thu, 20 Apr 2006 09:16:20 +0000 (UTC)
  15. User-Agent: G2/0.2
  16. X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2,gzip(gfe),gzip(gfe)
  17. Complaints-To: groups-abuse@google.com
  18. Injection-Info: z34g2000cwc.googlegroups.com; posting-host=67.53.150.18;
  19.    posting-account=ornCOQwAAAAyCG4a7NOAj_SMr54FiqNu
  20. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15564
  21.  
  22. Can anyone tell me why there is such a huge time discrepency between
  23. the execution of the following scripts.  The only difference is the
  24. curly braces.  I'm running on an ARM SBC from a flash drive, if that
  25. makes any difference.
  26.  
  27. ---- testx.ksc ----
  28. #!/usr/bin/kermit +
  29. {  assign \%p 1, set line  /dev/ttyAM\%p }
  30. { close }
  31. exit
  32.  
  33. ---- testy.ksc ----
  34. #!/usr/bin/kermit +
  35. assign \%p 1, set line  /dev/ttyAM\%p
  36. close
  37. exit
  38.  
  39. -- test results --
  40. $ time ./testx.ksc
  41. real    0m 0.60s
  42. user    0m 0.04s
  43. sys     0m 0.06s
  44.  
  45. $ time ./testy.ksc
  46. real    0m 0.09s
  47. user    0m 0.05s
  48. sys     0m 0.04s
  49.  
  50. Yes, when I go back and forth between the two scripts, the times of
  51. each stay consistent, so the second one shown above didn't just run
  52. faster because it was second; if I go back and run testx.ksc again, it
  53. takes 0.60s.
  54.  
  55. Of course "don't use the curly braces" but this is part of a larger
  56. system that I have distilled down to this very simple example, so
  57. that's really not an option.
  58.  
  59. Any ideas or input would be greatly appreciated.
  60.